package com.agino;

import org.nfunk.jep.JEP;

import java.util.HashMap;
import java.util.Map;

/**
 * Jep 测试
 *
 * @author agino
 * @version 1.0
 * @date 2022/8/1 14:46
 */
public class JepTest {

    public static void main(String[] args) {
        String expression = "max(2341)";

        Map<String, Object> params = new HashMap<>();
        params.put("2341", 3);

        JEP jep = new JEP();

//        params.forEach(jep::addVariableAsObject);

        jep.parseExpression(expression);

        Object result = jep.getValueAsObject();
        System.out.println(result);
    }
}
